module DocumentsHelper

  def get_document_title (document)
    return Document.find(document.document_id).title
  end

  def get_document_desc (document)
    return Document.find(document.document_id).description
  end

  def get_assigned_client(document)
    return Client.find(document.client_id).full_name
  end
  
  def get_doc_status(doc,client)
     client_doc =  ClientDocument.where("client_id = ? and document_id = ?", client.id,doc.id).first
     return client_doc.status unless client_doc.nil?
  end
end
